<!DOCTYPE html>
<html lang="en">
<head>
    <title>编辑未关闭事项</title>
    <meta http-equiv="pragma" content="no-cache">
    <meta http-equiv="Cache-Control" content="no-store, must-revalidate">
    <meta http-equiv="expires" content="Wed, 26 Feb 1997 08:21:57 GMT">
    <meta http-equiv="expires" content="-1">
    <meta content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no" name="viewport">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <meta http-equiv="refresh" content="1200">
    <link rel="shortcut icon" href="/dist/img/icon.png" type="image/x-icon">
    <!-- Bootstrap 3.3.6 -->
    <link rel="stylesheet" href="/dist/plugins/bootstrap/css/bootstrap.min.css">
    <!--字体-->
    <link rel="stylesheet" href="/dist/css/font-awesome.min.css">
    <!--图标-->
    <link rel="stylesheet" href="/dist/css/ionicons.min.css">
    <!--OA主样式-->
    <link rel="stylesheet" href="/dist/css/OA.min.css?t=86e2297f">
    <link rel="stylesheet" href="/dist/css/skins/OA-skins.min.css?t=222aea35">
    <link rel="stylesheet" href="//at.alicdn.com/t/font_855021_df13d5353cs.css">
    <link rel="stylesheet" href="/dist/plugins/webuploader-0.1.5/webuploader.css">
    
    <style>
        
        .webuploader-pick {
            background: url(/dist/img/fjT1.png) no-repeat 5px center;
            display: block;
            padding: 0 4px;
            height: 22px;
            line-height: 22px;
            padding-left: 15px;
            margin: 0 auto;
            width: 70px;
            border-radius: 4px;
            color: #2a8cec;
        }
        .webuploader-pick-hover {
            color: #fff !important;
            background: url(/dist/img/fjT2.png) no-repeat 5px center;
            background-color: #0F6099;

        }
        .lineOne {
            text-align: left;
        }

        .lineOne span {
            max-height: 20px;
            line-height: 20px;
            overflow: hidden;
            text-overflow: ellipsis;
            display: -webkit-box;
            -webkit-box-orient: vertical;
            -webkit-line-clamp: 1;
            text-align: left;
        }

        .div-td-content-more {
            position: absolute;
            height: auto;
            z-index: 999;
            line-height: 20px;
            background-color: #d3e8fd;
            padding: 8px 6px;
            border: 1px solid #e8e8ea;
            display: none;
        }

        .div-td-content-more i {
            width: 15px;
            height: 12px;
            background: url("/dist/img/more-icon.png");
            position: absolute;
            left: 50px;
            top: -12px;
        }

        .tdColor {
            width:190px;
            background-color: #f8f8f8;
        }

        .tdColor .icon-ren,.tdColor .icon-ren3{
            position: absolute;
            font-size: 16px;
        }
        .tdColor .icon-bixutian{
            font-size: 12px;
            /*color: red;*/
        }

        .td-value {
            text-align: left !important;
            vertical-align: middle;
            word-wrap: break-word;
            color: #2a8cec !important;
        }

        .td-value span {
            display: inline-block;
            max-height: 56px;
            overflow: hidden;
            padding: 0 6px;
            word-wrap: break-word;
            text-align: center !important;
        }
        .td-value1 {
            text-align: left !important;
            vertical-align: middle;
            word-wrap: break-word;
            color: #2a8cec !important;
        }
        .td-value1 .user{
            display: inline-block;
            float: left;
            overflow: hidden;
            cursor: pointer;
        }
        .user.select{
            color: #fff;
            background-color: #045B9E;
        }
        .td-value1 input,textarea{
            width: 100%;
            border: 0;
            outline: none;
        }
        .weChat{
            position: absolute;
            left: 200px;
            margin-top: 2px;
        }
        .weChat input{
            position: absolute;
            bottom: 18px;
            left: -15px;
        }
    </style>
</head>
<body>
<iframe id="ifAttach" style="display:none"></iframe>
<section class="content" id="app" style="width: 500px;float: left;">
    <table class="table table-bordered text-center table-width">
        <tbody>
            <!--<tr style="height: 50px">
                <td class="tdColor"><span class="iconfont icon-bixutian"></span>标题</td>
                <td class="td-value1">
                    <select style="width: 100%;font-size: 12px;line-height: 25px;border: 0px" v-model="msg.openTitle" @change="changeContent()">
                        <option value="稍后更新">稍后更新</option>
                        <option value="更新中">更新中</option>
                    </select>
                </td>
            </tr>
            &lt;!&ndash;<tr>
                <td class="tdColor"><span class="iconfont icon-bixutian"></span>版本号</td>
                <td colspan="3" class="td-value1">
                    <input type="text" v-model="msg.version"/>
                </td>
            </tr>&ndash;&gt;
            <tr  style="height: 150px">
                <td class="tdColor"><span class="iconfont icon-bixutian"></span>内容</td>
                <td class="td-value1">
                    <textarea v-model="msg.content" style="height: 150px"></textarea>
                </td>
            </tr>
            <tr  style="height: 50px">
                <td class="tdColor"><span class="iconfont icon-bixutian"></span>截止日期</td>
                <td class="td-value1">
                    <input class="pull-left form-control pull-left input-sm" type="text" v-model="msg.deadline"
                           @focus="showDatePicker($event)" placeholder="截止时间">
                </td>
            </tr>-->
        </tbody>
    </table>
    
    <div class="south" style="height:50px;line-height:50px;text-align:center;">
        <!--<input type="button" value="保存" class="btn oaBtn btn-sm" @click="submitData()"/>-->
        <input type="button" value="发送强制更新信息" class="btn oaBtn btn-sm" @click="submitData1()"/>
    </div>
</section>
<!--JQ-->
<script src="https://file.ggxqce.com/web/jquery-2.2.3.min.js"></script>
<!--插件JS-->
<script src="https://file.ggxqce.com/web/bootstrap.min.js"></script>
<!--框架已定义 JS-->
<script src="/dist/js/app_iframe.js?t=8e743a31"></script>
<!--oa自定义  JS-->
<script src="/dist/js/oa.js?t=54c6b89c"></script>
<script src="https://file.ggxqce.com/web/vue.min.js"></script>
<script type="text/javascript" src="/dist/plugins/lhgdialog/lhgdialog.min.js?self=true"></script>
<script type="text/javascript" src="/dist/plugins/My97DatePicker/WdatePicker.js"></script>
<script src="/dist/plugins/webuploader-0.1.5/webuploader.min.js"></script>
<script type="text/javascript" src="/dist/js/pages/common/commonService.js"></script>
<script type="text/javascript">
    var app = new Vue({
        el: '#app',
        data: {
            msg:{
                /*createUserId:getCurrentUser().id,
                content:"",
                openTitle:"",
                openUrl:"/page/update/show.html",
                deadline:""*/
            }
        },
        methods: {
            submitData1:function () {
                var save = confirm('确实要发送强制更新消息吗?');
                if(save){
                    $.wyui.postMethod("/updateInfo/sendUpdateMassage.json",{}, function (data) {
                        alert("保存成功");
                    });
                }
            },
            submitData:function(){
                /*var that = this;
                if(that.msg.openTitle == undefined || that.msg.openTitle == ""){
                    alert("更新标题不能为空");
                    return;
                }
                if(that.msg.content == undefined || that.msg.content == ""){
                    alert("更新内容不能为空");
                    return;
                }
                if(that.msg.deadline == undefined || that.msg.deadline == ""){
                    alert("截止日期不能为空");
                    return;
                }
                var save = confirm('确实要发送更新消息吗?\n更新标题：' + that.msg.openTitle + "\n更新内容："+ that.msg.content + "\n截止时间："+that.msg.deadline);
                if(save){
                    $.wyui.postMethod("/message/sendUpdateMassage.json",that.msg, function (data) {
                        alert("保存成功");
                    });
                }*/
            },
            showDatePicker: function (e) {
                var that = this;
                WdatePicker({
                    onpicked: function (dp) {
                        that.msg.deadline = dp.cal.getNewDateStr();
                        return true;
                    },
                    dateFmt: 'yyyy-MM-dd HH:mm:ss'
                });
                $(e.target).blur();
            },
            changeContent:function () {
                var that = this;
                var time = 0;
                if(that.msg.openTitle == "稍后更新"){
                    that.msg.content = "系统稍后更新，请及时保存草稿";
                    time = 2;
                }else if(that.msg.openTitle == "更新中"){
                    that.msg.content = "系统正在更新，请不要进行任何操作";
                    time =  5;
                }
                var date = new Date((new Date()).getTime() + 60000*time);
                that.msg.deadline = date.Format('yyyy-MM-dd hh:mm:ss')
            }
        },
        mounted: function () {

        }
    });
</script>
<script>
    $(function(){
    });
</script>

</body>
</html>